package com.db.williamchart.data.configuration;

import com.db.williamchart.data.AxisType;
import com.db.williamchart.data.Frame;
import com.db.williamchart.data.Paddings;
import com.db.williamchart.data.Scale;

public class ChartConfiguration {
    private int width;
    private int height;
    private Paddings paddings;
    private AxisType axis;
    private Float labelSize;
    private Scale scale;
    private String labelsFormatter;


    public ChartConfiguration(int width, int height, Paddings paddings, AxisType axis, Float labelSize, Scale scale, String labelsFormatter) {
        this.width = width;
        this.height = height;
        this.paddings = paddings;
        this.axis = axis;
        this.labelSize = labelSize;
        this.scale = scale;
        this.labelsFormatter = labelsFormatter;
    }

    public Frame toOuterFrame(){
        return new Frame(paddings.getLeft(),paddings.getTop(),width - paddings.getRight(),height - paddings.getBottom());
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public Paddings getPaddings() {
        return paddings;
    }

    public void setPaddings(Paddings paddings) {
        this.paddings = paddings;
    }

    public AxisType getAxis() {
        return axis;
    }

    public void setAxis(AxisType axis) {
        this.axis = axis;
    }

    public Float getLabelSize() {
        return labelSize;
    }

    public void setLabelSize(Float labelSize) {
        this.labelSize = labelSize;
    }

    public Scale getScale() {
        return scale;
    }

    public void setScale(Scale scale) {
        this.scale = scale;
    }

    public String getLabelsFormatter() {
        return labelsFormatter;
    }

    public void setLabelsFormatter(String labelsFormatter) {
        this.labelsFormatter = labelsFormatter;
    }
}
